package com.bkhc.common.util;

import org.springframework.beans.factory.annotation.Autowired;

public class SendMailJob implements Runnable{


    public MailTemplate mailTemplate;

    public String msg;

    public String to;

    public String subject;

    public SendMailJob(MailTemplate mailTemplate,
                       String msg,
                       String to,
                       String subject){
        this.mailTemplate=mailTemplate;
        this.msg=msg;
        this.subject=subject;
        this.to=to;
    }
    @Override
    public void run() {
        mailTemplate.sendEmailMsg(to,msg,subject);
    }
}
